package xpn.business.fund_return.entity.return_application_letter;

import org.springframework.data.rest.webmvc.RepositoryRestController;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xpn.platform.common.repository.XpnRepositoryController;

import javax.annotation.Resource;

@RestController
@RepositoryRestController
@RequestMapping("returnApplicationLetter")
public class ReturnApplicationLetterController extends XpnRepositoryController<ReturnApplicationLetter, Long> {

    @Resource
    private ReturnApplicationLetterService returnApplicationLetterService;

    @PostMapping("")
    public ReturnApplicationLetter saveReturnApplicationLetter(@RequestBody ReturnApplicationLetter returnApplicationLetter) {
        return returnApplicationLetterService.save(returnApplicationLetter);
    }
}
